<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>filter变量</title>
		<script src="vue.js"></script>
	</head>

	<body>
		<div id="app">
			<div>{{msg|toUpcase}}</div>
		</div>
	</body>
	<script>
		var vm = new Vue({
			el: '#app',
			data: {
				msg: "hello vue"
			},
			methods: {

			},
			filters: {
				toUpcase(value) {
					console.log(value);
					console.log(value.toUpperCase());
					return value ? value.toUpperCase() : "";
				}
			}
		})
	</script>

</html>